(C) 1996 AROS - The Amiga Replacement OS


NAME
#include <proto/iffparse.h>
LONG PopChunk()
SYNOPSIS
struct IFFHandle * iff

LOCATION
In IFFParseBase at offset 15
FUNCTION
Pops a context node of the context stack. Usually called in write mode to signal the end of a chunk.

INPUTS
iff
pointer to IFFHandle struct.
RESULT
error - 0 if successfull, IFFERR_#? otherwise.

NOTES
EXAMPLE
BUGS
SEE ALSO
PushChunk()
INTERNALS
Frees a contextnode an all its related LCIs and removes it from the stack-list If we are in write mode, we will update the cn_Size in the chunk according t cn_Scan, and we will also insert an align byte if necessary

If the stream was of PushChunked() as IFFSIZE_UNKNOWN, we have to seek backwards and write the correct size. Since non RSEEK streams are automagically buffered by WriteStream, we don't have to fiddle with it here. However if the stream is buffered, we MUST see if we are about to pop the chunk that started the Buffering (in PushChunk)

HISTORY
03.02.1997 digulla
Some major hacks because we don't have A6 - The IFFParseBase must be passed to the hooks in hook->h_Data.
03.02.1997 digulla
Iffparse.library as supplied by Nils H. Lorentzen